
import axios from 'axios';
import {API_VERSION} from '../api';

/**
 * 获取订单列表
 */
export const getOrderTableData = params => {
  return axios.get(API_VERSION + 'orders_track/orders', {params: params});
};

/**
 * 获取订单跟踪记录
 */
export const getOrderTracksByOrderId = orderId => {
  return axios.get(API_VERSION + 'orders_tracks/order_id_pc?orderId=' + orderId);
};

/**
 * 根据id获取订单详情
 * @param token
 * @param params
 * @returns {AxiosPromise}
 */
export const getOrder = (token, id) => {
  return axios.get(API_VERSION + 'orders_id' + '?token=' + token + '&id=' + id);
};
